home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 05.zip / BS1 part 5 / PDraw3.0.adf / pdraw_dat.lzh / pdpsprlg < prev    next >
Text File  |  1992-07-15  |  14KB  |  586 lines

  1. %==================================================================%
  2. % Professional Draw PostScript Prologue file: V3.01, July 15, 1992 %
  3. %==================================================================%
  4.  
  5. /uniqueid 0 def
  6. /amigavec [
  7. 8#055 /hyphen
  8. 8#230 /dotlessi
  9. 8#231 /grave
  10. 8#232 /acute
  11. 8#233 /circumflex
  12. 8#234 /tilde
  13. 8#235 /dieresis
  14. 8#236 /ring
  15. 8#237 /cedilla
  16. 8#240 /space
  17. 8#241 /exclamdown
  18. 8#242 /cent
  19. 8#243 /sterling
  20. 8#244 /currency
  21. 8#245 /yen
  22. 8#246 /bar
  23. 8#247 /section
  24. 8#250 /dieresis
  25. 8#251 /copyright
  26. 8#252 /ordfeminine
  27. 8#253 /guillemotleft
  28. 8#254 /logicalnot
  29. 8#255 /.notdef
  30. 8#256 /registered
  31. 8#257 /macron
  32. 8#260 /ring
  33. 8#261 /.notdef
  34. 8#262 /.notdef
  35. 8#263 /dagger
  36. 8#264 /.notdef
  37. 8#265 /.notdef
  38. 8#266 /paragraph
  39. 8#267 /bullet
  40. 8#270 /quotesinglbase
  41. 8#271 /.notdef
  42. 8#272 /ordmasculine
  43. 8#273 /guillemotright
  44. 8#274 /.notdef
  45. 8#275 /.notdef
  46. 8#276 /.notdef
  47. 8#277 /questiondown
  48. 8#300 /Agrave
  49. 8#301 /Aacute
  50. 8#302 /Acircumflex
  51. 8#303 /Atilde
  52. 8#304 /Adieresis
  53. 8#305 /Aring
  54. 8#306 /AE
  55. 8#307 /Ccedilla
  56. 8#310 /Egrave
  57. 8#311 /Eacute
  58. 8#312 /Ecircumflex
  59. 8#313 /Edieresis
  60. 8#314 /Igrave
  61. 8#315 /Iacute
  62. 8#316 /Icircumflex
  63. 8#317 /Idieresis
  64. 8#320 /.notdef
  65. 8#321 /Ntilde
  66. 8#322 /Ograve
  67. 8#323 /Oacute
  68. 8#324 /Ocircumflex
  69. 8#325 /Otilde
  70. 8#326 /Odieresis
  71. 8#327 /.notdef
  72. 8#330 /Oslash
  73. 8#331 /Ugrave
  74. 8#332 /Uacute
  75. 8#333 /Ucircumflex
  76. 8#334 /Udieresis
  77. 8#335 /.notdef
  78. 8#336 /.notdef
  79. 8#337 /germandbls
  80. 8#340 /agrave
  81. 8#341 /aacute
  82. 8#342 /acircumflex
  83. 8#343 /atilde
  84. 8#344 /adieresis
  85. 8#345 /aring
  86. 8#346 /ae
  87. 8#347 /ccedilla
  88. 8#350 /egrave
  89. 8#351 /eacute
  90. 8#352 /ecircumflex
  91. 8#353 /edieresis
  92. 8#354 /igrave
  93. 8#355 /iacute
  94. 8#356 /icircumflex
  95. 8#357 /idieresis
  96. 8#360 /.notdef
  97. 8#361 /ntilde
  98. 8#362 /ograve
  99. 8#363 /oacute
  100. 8#364 /ocircumflex
  101. 8#365 /otilde
  102. 8#366 /odieresis
  103. 8#367 /.notdef
  104. 8#370 /oslash
  105. 8#371 /ugrave
  106. 8#372 /uacute
  107. 8#373 /ucircumflex
  108. 8#374 /udieresis
  109. 8#375 /.notdef
  110. 8#376 /.notdef
  111. 8#377 /ydieresis
  112. ] def
  113.  
  114. /bdef {bind def} bind def
  115. /ldef {load def} bdef
  116. /n /newpath ldef
  117. /m2 /moveto ldef
  118. /l2 /lineto ldef
  119. /c2 /curveto ldef
  120. /rm /rmoveto ldef
  121. /rl /rlineto ldef
  122. /gs /gsave ldef
  123. /gr /grestore ldef
  124. /g /setgray ldef
  125. /s /stroke ldef
  126.  
  127. %
  128. %  Font handling routines
  129. %
  130.  
  131. /dontCopyID false def
  132. /copyfont {
  133.    { exch dup /FID ne
  134.       {
  135.          dup /UniqueID eq dontCopyID and
  136.          {pop pop}
  137.          {
  138.             dup /Encoding eq
  139.             { exch dup length array copy outfontdict 3 1 roll put}
  140.             { exch outfontdict 3 1 roll put}
  141.             ifelse
  142.          }
  143.          ifelse
  144.       }
  145.       { pop pop}
  146.       ifelse
  147.    } forall
  148. } bdef
  149.  
  150. /recode {
  151.    copyfont dup dup
  152.    outfontdict /FontName 3 -1 roll put
  153.    amigavec aload pop
  154.    amigavec length 2 idiv
  155.    {outfontdict /Encoding get 3 1 roll put} repeat
  156. } bdef
  157.  
  158. /defamigafont {
  159.    /fntsclmtx [0 0 0 0 0 0] def
  160.    exch
  161.    dup fntsclmtx exch 0 exch put
  162.    neg fntsclmtx exch 3 exch put
  163.    findfont fntsclmtx makefont setfont
  164. } bdef
  165.  
  166. /deffont  {
  167.    3 -1 roll
  168.    {
  169.       dup dup length dup 5 add string /newnamestr exch def
  170.       exch newnamestr copy pop newnamestr exch (Amiga) putinterval
  171.       newnamestr cvn dup FontDirectory exch known
  172.       {exch pop}
  173.       {
  174.          exch cvn findfont
  175.          dup maxlength 2 add dict /outfontdict exch def
  176.          /dontCopyID false def recode
  177.          outfontdict definefont pop
  178.       }
  179.       ifelse
  180.    }
  181.    { cvn }
  182.    ifelse
  183.    defamigafont
  184. } bdef
  185.  
  186. /rect 4 array def  % used in dobox
  187. /dorect {
  188.    n
  189.    rect aload pop 4 copy m2 3 1 roll exch l2
  190.    4 2  roll l2 l2
  191.    closepath
  192. } bdef
  193.  
  194. /dobox {              %clip trnsp x1 y1 x2 y2 dobox
  195.    rect astore pop
  196.    {} {dorect 1 g fill} ifelse
  197.    {dorect clip} if
  198. } bdef
  199.  
  200. /dogreyimage {   % width height xscl yscl x0 y0 dogreyimage
  201.    5 index 1 add 2 idiv string
  202.    /picstr exch def
  203.    translate scale
  204.    4 [1 0 0 1 0 0]
  205.    {currentfile  picstr readhexstring pop }
  206.    image
  207. } bdef
  208.  
  209. /do8greyimage {   % width height xscl yscl x0 y0 do8greyimage
  210.                   % same as above, but 8 bits per sample
  211.    5 index string
  212.    /picstr exch def
  213.    translate scale
  214.    8 [1 0 0 1 0 0]
  215.    {currentfile  picstr readhexstring pop }
  216.    image
  217. } bdef
  218.  
  219. /do8bingreyimage {   % width height xscl yscl x0 y0 do8greyimage
  220.                      % same as above, but 8 bits per sample
  221.    5 index string
  222.    /picstr exch def
  223.    translate scale
  224.    8 [1 0 0 1 0 0]
  225.    {currentfile  picstr readstring pop }
  226.    image
  227. } bdef
  228.  
  229.  
  230. /docolorimage { % width height xscl yscl x0 y0 docolorimage
  231.    4 dict begin
  232.      5 index 1 add 2 idiv
  233.      dup /cstr exch string def
  234.      dup /ystr exch string def
  235.      dup /mstr exch string def
  236.      /kstr exch string def
  237.      translate scale
  238.      4 [1 0 0 1 0 0]
  239.      { currentfile cstr readhexstring pop }
  240.      { currentfile mstr readhexstring pop }
  241.      { currentfile ystr readhexstring pop }
  242.      { currentfile kstr readhexstring pop }
  243.      true 4 colorimage
  244.    end
  245. } bdef
  246.  
  247. /do8colorimage { % width height xscl yscl x0 y0 docolorimage
  248.    4 dict begin
  249.      5 index
  250.      dup /cstr exch string def
  251.      dup /ystr exch string def
  252.      dup /mstr exch string def
  253.      /kstr exch string def
  254.      translate scale
  255.      8 [1 0 0 1 0 0]
  256.      { currentfile cstr readhexstring pop }
  257.      { currentfile mstr readhexstring pop }
  258.      { currentfile ystr readhexstring pop }
  259.      { currentfile kstr readhexstring pop }
  260.      true 4 colorimage
  261.    end
  262. } bdef
  263.  
  264. /bwline {  % linewidth linejoin linecap grey dash 0 bwline
  265.    setdash g setlinecap setlinejoin setlinewidth
  266. } bdef
  267.  
  268. /colorline {  %linewidth linejoin linecap c m y k dash 0 colorline
  269.    setdash setcmykcolor setlinecap setlinejoin setlinewidth
  270. } bdef
  271.  
  272. /ellipsedict 2 dict def
  273. ellipsedict /mtrx matrix put
  274.  
  275. /ellipse {              % xr yr angle cx cy  ellipse
  276.    ellipsedict begin
  277.       /savematrix mtrx currentmatrix def
  278.       translate
  279.       rotate
  280.       scale
  281.       0 0 1 0 360 arc
  282.       savematrix setmatrix
  283.    end
  284. } bdef
  285.  
  286. /initpage {
  287.    gs
  288.    mir {pagexsize 0 translate -1 1 scale} if
  289.    0 pageysize translate
  290.    0.96 -0.96 scale
  291. } bdef
  292.  
  293. /endpage {
  294.    gr
  295. } bdef
  296.  
  297. /getpagetype { % width ht orient getpagetype width ht orient pagetype
  298.    dup 0 eq {0}
  299.    {
  300.       3 copy pop
  301.       2 copy 709 le exch 499 le and
  302.       {pop pop 4} {
  303.          2 copy 842 le exch 596 le and
  304.          {pop pop 3} {
  305.             2 copy 792 le exch 612 le and
  306.             {pop pop 1} {
  307.                1008 le exch 612 le and
  308.                {2} {0} ifelse
  309.             } ifelse
  310.          } ifelse
  311.       } ifelse
  312.    } ifelse
  313. } bdef
  314.  
  315. /initcolorpage { % pitch1 angle1 ... pitch4 angle4 ysize width ht orient neg mirror manual #copies epsf----
  316.    commoninit
  317.    12 dict begin
  318.       /ka exch def /kf exch def
  319.       /ba exch def /bf exch def
  320.       /ga exch def /gf exch def
  321.       /ra exch def /rf exch def
  322.       currentcolorscreen
  323.       /kp exch def pop pop
  324.       /bp exch def pop pop
  325.       /gp exch def pop pop
  326.       /rp exch def pop pop
  327.       rf ra /rp load gf ga /gp load bf ba /bp load kf ka /kp load setcolorscreen
  328.    end
  329. } bdef
  330.  
  331. /initbwpage { % pitch angle ysize width ht orient neg mirror manual #copies epsf ----
  332.    commoninit
  333.    currentscreen 3 1 roll pop pop setscreen
  334. } bdef
  335.  
  336. /donegprint
  337. {
  338.    0 g
  339.    0 0 m2 pagexsize 0 l2 pagexsize pageysize l2
  340.    0 pageysize l2 closepath fill
  341.    [{1 exch sub} /exec load currenttransfer /exec load] cvx settransfer
  342. } bdef
  343.  
  344. /commoninit { % ysize width ht orient neg mirror manual #copies epsf ----
  345.    {   pop pop pop pop pop pop pop
  346.        /pageysize exch def
  347.    }
  348.    {
  349.       /#copies exch def
  350.       /man exch def
  351.       /mir exch def
  352.       /negat exch def
  353.       3 -1 roll dup /pagexsize exch def 3 1 roll
  354.       4 -1 roll dup /pageysize exch def 4 1 roll
  355.       statusdict begin
  356.  
  357.          statusdict /manualfeed known
  358.          {/manualfeed man def} if
  359.          statusdict /mirrorprint known
  360.          {/mirrorprint mir def userdict begin /mir false def end} if
  361.          statusdict /negativeprint known
  362.          {/negativeprint negat def} {negat {donegprint} if} ifelse
  363.  
  364.          getpagetype
  365.          dup 0 ne {
  366.             dup 1 eq {
  367.                userdict /letter known
  368.                {letter} {pop 0} ifelse
  369.             } if
  370.             dup 2 eq {
  371.                userdict /legal known
  372.                {legal}  {pop 0} ifelse
  373.             } if
  374.             dup 3 eq {
  375.                userdict /a4 known
  376.                {a4} {pop 0} ifelse
  377.             } if
  378.             dup 4 eq {
  379.                userdict /b5 known
  380.                {b5} {pop 0} ifelse
  381.             } if
  382.          } if
  383.          0 eq statusdict /setpage known and
  384.          {setpage} {pop pop pop} ifelse
  385.       end
  386.       pop % pop pageysize as it was already used
  387.    }
  388.    ifelse
  389.  
  390. } bdef
  391.  
  392. /crop {                 % x0 y0 x1 y1 l s crop
  393.     2 dict begin
  394.        /spc exch def /len exch def
  395.        gs initclip n
  396.        0.25 setlinewidth 0 setgray
  397.        2 copy m2 0 spc rm 0 len rl 2 copy m2 spc 0 rm len 0 rl
  398.        4 2 roll 2 copy m2 0 spc neg rm 0 len neg rl 2 copy m2 spc neg 0 rm len neg 0 rl
  399.        4 1 roll exch
  400.        2 copy m2 0 spc rm 0 len rl m2 spc neg 0 rm len neg 0 rl
  401.        exch 2 copy m2 spc 0 rm len 0 rl m2 0 spc neg rm 0 len neg rl
  402.        s gr
  403.     end
  404. } bdef
  405.  
  406. /cross {   % xc yc len cross
  407.    1 dict begin
  408.       /len exch def
  409.       m2 0 len -2 div rm 0 len rl
  410.       len -2 div dup rm len 0 rl
  411.       s
  412.    end
  413. } bdef
  414.  
  415. /oneregister {   % xc yc len oneregister
  416.    0 setgray 0.25 setlinewidth
  417.    3 copy 3 copy cross 4 div 0 360 arc fill
  418.    1 setgray 2 div cross
  419. } bdef
  420.  
  421. /drwcalibbar {   % x0 y0 wid len drwcalibbar
  422.    fourcol not component 1 eq or {
  423.       5 dict begin
  424.          n
  425.          /len exch def /width exch def /y0 exch def /x0 exch def
  426.          /increment width 10 div def
  427.          increment len gt {
  428.             /increment len def
  429.          } if
  430.          x0 y0 m2
  431.          0.0 0.1 1.0 {
  432.             setgray
  433.             len neg 0 rl 0 increment rl len 0 rl currentpoint fill m2
  434.          } for
  435.       end
  436.    }
  437.    {
  438.       pop pop pop pop
  439.    } ifelse
  440. } bdef
  441.  
  442. /drwpatch {              % k y m c len incr drwpatch
  443.    3 dict begin
  444.       /incr exch def /len exch def
  445.       component 1 eq {pop pop pop /grayval exch def}{
  446.          component 2 eq {pop pop /grayval exch def pop}{
  447.             component 3 eq {pop /grayval exch def pop pop}{
  448.                component 4 eq {/grayval exch def pop pop pop}{
  449.                   /grayval -1 def pop pop pop pop
  450.                }ifelse
  451.             }ifelse
  452.          }ifelse
  453.       } ifelse
  454.       grayval -1 ne {
  455.          grayval setgray
  456.          len neg 0 rl 0 incr neg rl len 0 rl currentpoint fill m2
  457.       } if
  458.    end
  459. } bdef
  460.  
  461. /drwcolcalib {   % gr1 gr2 x0 y0 wid len drwcolcalib
  462.    7 dict begin
  463.       n
  464.       /len exch def /width exch def /y0 exch def /x0 exch def
  465.       /gr2 exch def /gr1 exch def
  466.       /increment width 10 div def
  467.       increment len gt {
  468.          /increment len def
  469.       } if
  470.       x0 y0 m2
  471.       gr1 1.0 1.0 1.0 len increment drwpatch   % K
  472.       1.0 gr1 gr1 gr1 len increment drwpatch   % CMY
  473.       1.0 gr2 1.0 gr2 len increment drwpatch   % CY
  474.       1.0 1.0 1.0 gr2 len increment drwpatch   % C
  475.       1.0 1.0 gr2 gr2 len increment drwpatch   % CM
  476.       1.0 1.0 gr2 1.0 len increment drwpatch   % M
  477.       1.0 gr2 gr2 1.0 len increment drwpatch   % MY
  478.       1.0 gr2 1.0 1.0 len increment drwpatch   % Y
  479.    end
  480. } bdef
  481.  
  482. /register {             % x0 y0 x1 y1 l s register
  483.     6 dict begin
  484.        gs initclip n
  485.        /spc exch def /len exch def
  486.        /y1 exch def /x1 exch def /y0 exch def /x0 exch def
  487.        x1 x0 add 2 div y0 spc sub len 2 div sub len oneregister
  488.        x1 x0 add 2 div y1 spc len 2 div add add len oneregister
  489.        x0 spc sub len 2 div sub y1 y0 add 2 div len oneregister
  490.        x1 spc len 2 div add add y1 y0 add 2 div len oneregister
  491.        gr
  492.     end
  493. } bdef
  494.  
  495. %%%% Gradient Fill operators: %%%%%%
  496.  
  497. /defhexstr {   % length /strvar defhexstr -> length
  498.    currentfile 2 index string readhexstring pop def
  499. } bind def
  500.  
  501. /getgraystr {  % length getgraystr -> length + /gray
  502.    /gray defhexstr
  503. } bind def
  504.  
  505. /getcmykstr {  % length getcmykstr -> length + /cstr+/mstr+/ystr+/kstr
  506.    /cstr defhexstr
  507.    /mstr defhexstr
  508.    /ystr defhexstr
  509.    /kstr defhexstr
  510. } bind def
  511.  
  512. /setgraygrad { % index setgraygrad
  513.    gray exch get 255.0 div setgray
  514. } bind def
  515.  
  516. /setcmykgrad { % index setcmykgrad -> index
  517.    dup     cstr exch get 255.0 div  % -> index cval
  518.    1 index mstr exch get 255.0 div  % -> index cval mval
  519.    2 index ystr exch get 255.0 div  % -> index cval mval yval
  520.    kstr 5 -1 roll    get 255.0 div  % -> cval mval yval kval
  521.    setcmykcolor
  522. } bind def
  523.  
  524. /radgrad {     % cx cy radius /setcol steps /getstr radgrad
  525.    6 dict begin
  526.       gsave eoclip
  527.       cvx exec          % read necessary strings with color information
  528.       /steps exch def
  529.       /setcol exch def
  530.       dup steps div /rstep exch def  % -> cx cy radius
  531.       0 1 steps 1 sub {
  532.          setcol
  533.          newpath 3 copy 0 360 arc eofill
  534.          rstep sub
  535.       } for
  536.       pop pop pop
  537.       grestore
  538.    end
  539. } bind def
  540.  
  541. /linXgrad {    % x1 y1 x2 y2 wd /setcol steps /getstr linXgrad
  542.    7 dict begin
  543.       gsave eoclip
  544.       cvx exec          % read necessary strings with color information
  545.       /steps exch def
  546.       /setcol exch def
  547.       steps div /dx exch def        % -> x1 y1 x2 y2
  548.       0 1 steps 1 sub {
  549.          setcol
  550.          newpath
  551.          3 index dx add 3 index m2    % -> x1 y1 x2 y2 {x1+dx y1}
  552.          1 index dx add 1 index l2    % -> x1 y1 x2 y2 {x2+dx y2}
  553.          4 copy l2 l2             % -> x1 y1 x2 y2 {x1 y1} {x2 y2}
  554.          closepath eofill
  555.          dx 0 translate
  556.       } for
  557.       pop pop pop pop
  558.       grestore
  559.    end
  560. } bind def
  561.  
  562. /linYgrad {    % x1 y1 x2 y2 ht /setcol steps /getstr linYgrad
  563.    7 dict begin
  564.       gsave eoclip
  565.       cvx exec          % read necessary strings with color information
  566.       /steps exch def
  567.       /setcol exch def
  568.       steps div neg /dy exch def    % -> x1 y1 x2 y2
  569.       0 1 steps 1 sub {
  570.          setcol
  571.          newpath
  572.          3 index 3 index dy add m2    % -> x1 y1 x2 y2 {x1 y1+dy}
  573.          2 copy dy add l2             % -> x1 y1 x2 y2 {x2 y2+dy}
  574.          4 copy l2 l2             % -> x1 y1 x2 y2 {x1 y1} {x2 y2}
  575.          closepath eofill
  576.          0 dy translate
  577.       } for
  578.       pop pop pop pop
  579.       grestore
  580.    end
  581. } bind def
  582.  
  583. %================================================================%
  584.  
  585. %%EndProlog
  586.